﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using QuickGraph.Collections;
using QuickGraph.Algorithms;
using QuickGraph.Contracts;
using GraphSharp;
using System.Windows.Forms.Integration;

namespace DFAGuiApplication
{
    public partial class Form2 : Form
    {
        private DFASimulation.DFAInterface dfainterface;
        public List<String> Qnames { get; set; }
        public List<String> Qids { get; set; }
        public List<List<String>> trans { get; set; }

        public Form2()
        {
            InitializeComponent();
        }

        public Form2(List<String> names, List<String> ids, List<List<String>> trans)
        {
            Qnames = new List<String>(names);
            Qids = new List<String>(ids);
            this.trans = new List<List<String>>(trans);
            InitializeComponent();
        }

        public Form2(DFASimulation.DFAInterface dfainterface)
        {
            // TODO: Complete member initialization
            this.dfainterface = dfainterface;
            InitializeComponent();
        }

        private void Form2_Load(object sender, EventArgs e)
        {
            ElementHost host = new ElementHost();
            host.Dock = DockStyle.Fill;
            //GraphLibrary.GraphControl graph = new GraphLibrary.GraphControl(Qnames, Qids, trans);
            GraphLibrary.GraphControl graph = new GraphLibrary.GraphControl(dfainterface);
            host.Child = graph;
            Controls.Add(host);
        }

    }
}
